sampler TextureSampler : register(s0);
float spriteX;
float spriteY;

float4 PixelShader(float4 color : COLOR0, float4 texCoord : TEXCOORD0) : COLOR0
{
    // Look up the texture color.
    float4 tex = tex2D(TextureSampler, texCoord);
    
    // Convert it to greyscale. The constants 0.3, 0.59, and 0.11 are because
    // the human eye is more sensitive to green light, and less to blue.
    float greyscale = dot(tex.rgb, float3(0.3, 0.59, 0.11));
    float orangescale = float3(0.5, 0.5, 0.0);
    // The input color alpha controls saturation level.
    //if (spriteX > 500.0f)
    //{
		tex.rgb = lerp(greyscale, tex.rgb, color.a * 4);
    //}
    //texCoord.x += 1000.0f;
    //tex.a = 0.0f;
    
    return tex;
}


technique light
{
    pass Pass1
    {
        PixelShader = compile ps_2_0 PixelShader();
    }
}